package cn.cxyxj;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RequestController {

    @Autowired
    private OpenFeignService openFeignService;

    @GetMapping("/get")
    public String get(){
        return openFeignService.openFeignStart();
    }

    @PostMapping("/get-json-params")
    public Params jsonParams(@RequestBody Params params){
        return openFeignService.jsonParams(params);
    }

    @PostMapping("/get-form-params")
    public Params formParams(Params params){
        return openFeignService.formParams(params);
    }

}
